<form name="appForm" method="post" action="">

                        <?php echo $this->render('toolbarInvoice.php')?>
                        <div class="clr"></div>
                        <?php echo $this->render('sublink.php')?>

                        <!-- BEGIN: CONTENT -->
                        <div id="element-box">
                            <div class="t">
                                <div class="t">
                                    <div class="t"></div>
                                </div>
                            </div>
                            <div class="m">
                                <!-- BEGIN: ELEMENT BOX -->
                                <table class="adminlist">
                                    <thead>
                                        <tr>
                                            <th width="43" >
                                            	<input type="checkbox" name="checkbox" id="checkbox" onclick="checkedAll()">
                                           	</th>
                                            <th><?php echo $this->translate('Product name')?></th>
                                            <th width="80"><?php echo $this->translate('Quantity')?></th>
                                            <th width="250"><?php echo $this->translate('Price')?> (VND)</th>
                                            <th><?php echo $this->translate('Full name')?></th>
                                            <th><?php echo $this->translate('Email')?></th>
                                            <th><?php echo $this->translate('Phone')?></th>
                                            <th><?php echo $this->translate('Address')?></th>
                                            <th><?php echo $this->translate('Created')?></th>
                                            <th width="90"><?php echo $this->translate('Control')?></th>
                                            <th width="34">ID</th>
                                        </tr>
                                    </thead>
									<?php
										foreach($this->Items as $key => $val){
//											echo "<pre>";
//														print_r($val);
//													echo "</pre>";
											$product_name  	= $val['product_name'];
											$quantity  		= $val['quantity'];
											$price  		= $val['price_pro'] * $val['quantity'];
											$price			= number_format($price);
											$full_name  	= $val['full_name'];
											$email  		= $val['email'];
											$phone  		= $val['phone'];
											$address  		= $val['address'];
											$created  		= $val['created'];
											$id		  		= $val['id'];
											
											$linkInfo		= $this->baseUrl($this->currentController . '/info/id/' . $id);											
											$btnInfo		= $this->cmsIconButton('View Item',$this->imgUrl . '/icon_info.png',$linkInfo);
											
											$linkDelete		= $this->baseUrl($this->currentController . '/delete/id/' . $id);
											$btnDelete =  $this->cmsAjaxButton('ajax-delete-item', 'Delete Item', 'Delete *'. $name . '*', $linkDelete, $id);
										
											$strIconButton	= $btnInfo . ' ' . $btnDelete;
											
											$cid			= $this->formCheckbox('cid[]',$val['id']);
											$cls = 'row0';
											if($key%2 != 0){
												$cls = 'row1';
											}
									?>
                                    <tr class="even <?php echo $cls ?>">						
                                       <td align="center"><?php echo $cid;?></td>
                                       <td align="center"><?php echo $product_name;?></td>
                                       <td align="center"><?php echo $quantity;?></td>
                                       <td align="center"><?php echo $price;?></td>
                                       <td align="center"><?php echo $full_name;?></td>
                                       <td align="center"><?php echo $email;?></td>
                                       <td align="center"><?php echo $phone;?></td>
                                       <td align="center"><?php echo $address;?></td>
                                       <td align="center"><?php echo $created;?></td>
                                       <td align="center"><?php echo $strIconButton;?></td>
                                       <td align="center"><?php echo $id;?></td>
                                    </tr>
                                    <?php 
										}
                                    ?>
                                    <!-- BEGIN: PAGINATION (FOOT) -->
                                    <tfoot>
                                        <tr>
                                            <td colspan="19">
                                                <div class="container">
                                                    <div class="pagination">
                                                        
                                                        <div class="limit"></div>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>					
                                    </tfoot>				<!-- END: PAGINATION (FOOT) -->
                                </table>
                                <!-- Area 4: In du lieu lay tu database - End -->

                                <!-- END: ELEMENT BOX -->	
                              <div class="clr"></div>
                            </div>
                            <div class="b">
                                <div class="b">
                                    <div class="b"></div>
                                </div>
                            </div>
                        </div>
                        <!-- END: 	CONTENT -->
                    </form>